package blueq.dao.mongodb;

import javax.annotation.Resource;

import org.springframework.data.mongodb.core.MongoTemplate;

public class MongoDBDao {
	@Resource(name="mongoTemplate")
	private MongoTemplate mongoTemplate;

	public MongoTemplate getMongoTemplate() {
		return mongoTemplate;
	}

	public void setMongoTemplate(MongoTemplate mongoTemplate) {
		this.mongoTemplate = mongoTemplate;
	}
	
	public <T> void saveObject(T t){
		this.mongoTemplate.save(t);
	}
	
	public <T> T find(Class<T> entityClass){
		this.mongoTemplate.findAll(entityClass);
		return null;
	}
	
	
}
